local CommonOHOH = _G.CommonOHOH;
local M = CommonOHOH.class.new(script, CommonOHOH.files.BaseComponent());



function M.new(self,...)
	return M(self,...);
end;

function M.ctor(self, parent)
	M.super.ctor(self, parent);
	self.player=self.parent.player
	self.itemCtrl=self.player:GetComponent(_G.ServerOHOH.load.Server_ItemCtrl())
	self.parent.HurtEvent:Connect(function()
		self.itemCtrl:AddItem({
			base_exp=self.parent:GetExpValue()
		})
	end)

	self.parent.DieEvent:Connect(function()
		self.itemCtrl:AddItem({
			base_exp=self.parent:GetExpValue()
		})
	end)

	-- self.attributeCtrl=self.player:GetComponent(CommonOHOH.load.Common_AttributeCtrl())
	-- self.parent.HurtEvent:Connect(function()
	-- 	self.itemCtrl:AddItem({
	-- 		base_exp=self.parent:GetExpValue()
			
	-- 	})

	-- 	self.attributeCtrl:AddExp(self.parent:GetExpValue())
	-- end)

	-- self.parent.DieEvent:Connect(function()
	-- 	self.itemCtrl:AddItem({
	-- 		base_exp=self.parent:GetExpValue()
	-- 	})
	-- end)

end;


return M